<template>
	<div>
     <code>
      <svg-icon icon-class="message" style="margin-right:10px;color:red;font-size:20px;"></svg-icon>
      备注：用于商品详情展示
    </code>
    <tinymce :height="500" v-model="mallConfig.notice" style="width: 800px;margin:10px;"></tinymce>
    <p v-if="permission == 3" style="width: 500px;text-align: center;"><el-button type="primary" icon="el-icon-check" @click="save('notice')">保存</el-button></p>
  </div>
</template>
<script>
import Tinymce from '@/components/Tinymce'
export default {
  props: ['mallConfig', 'permission'],
  data() {
    return {
    }
  },
  components: {
    Tinymce,
  },
  methods: {
    save(msg) {
      if (this.mallConfig.notice == '' || this.mallConfig.notice == null) {
        this.$message({
          message: '请填写购买须知',
          type: 'error'
        })
        return
      }
      this.$emit('save', msg)
    }
  }
}
</script>
